Build dApp Store using dApp Store Kit
Understanding and Expectations
A decentralized app store will be, like all other apps have a certain frontend and a certain backend. This dapp store will be implemented using dApp Store Kit.
The frontend will be your branding and UX as much as you want to. In order to support all kinds of customizations we will be releasing the backend APIs first and then frontend SDK (React Components).
It is assumed that at this moment, you own your frontend implementations and use the backend API calls and SDK to interact with the dApp Store Kit.
API & SDK
API
If you have a native app (android or iOS), or any app that can not use npm package, then this is the right choice for you. The API is documented at https://docs.meroku.store/.
SDK
The SDK is currently available for nodejs apps. It’s a wrapper over the API mentioned above and exposes similar functionalities. More details on installing and using the SDK is available at its documentation at @merokudao/storekit-sdk.
User Authentication and details
The read access to dApp Store Kit’s functions don’t require any specific authentication.
In order to download the app or visit it’s URL or rate the app, a user id is required. This user id could be any identifier, that uniquely identifies a user. If your dApp Store Implementation has a notion of “user id” or similar, that field should go here.
If your dApp Store has no concept of “user id”, a wallet address can also be provided instead.
Device Details
Some calls like “download Build URL” requires a device detail. This could be a unique identifier for device. For android devises this could be “GSF Code”. This is used to obtain information like which users have what apps installed on what device.
Getting list of apps
There are two ways to get the list of apps.
API - The API is documented at https://docs.meroku.store/#/operations/getDApp. It can be used to get a paginated list of all apps from the registry. There are also advanced filter and search options which can be used to find specific dapp or dapps.
Using the SDK. DAppRegistryApi | @merokudao/storekit-sdk
UX Note
Once your application gets a list of apps, they should display them in a paginated manner.
A simple search bar should be shown on top to search for apps.
A more advanced filter option may be shown for users to filter results based on parameters like category etc.
Some filter options should be set by default by your implementation. Examples include
Geographical Restrictions: While performing search, you should set the parameters to filter only apps that are legal in the geographical area where user’s request is coming from.
Age restrictions: By default, the implementation should filter on the age based on user’s age.
A complete list of filter options is available for API at GET /dApp
doc and for SDK in the FilterOptions
Redirecting users to the app
In order to redirect users to the app, following link should be used. This link has analytics associated with the visits.
API - https://docs.meroku.store/#/operations/visitDapp.
SDK - AnalyticsApi | @merokudao/storekit-sdk.
Downloading the app
By default a button to download the app should be shown at an appropriate place. This button should be linked with the URL to download the app. This link has authentication & analytics associated with it.
API - https://docs.meroku.store/#/operations/downloadBuildUrl.
SDK - DAppRegistryApi | @merokudao/storekit-sdk.
Managing app
This step will change as we progress towards decentralization. To know more, visit progressive decentralization.
At the moment, managing an app involves following
The registry is located in the dapp-store-registry repo.
An update can be made by forking the repo and submitting a PR with the app added/updated.
This PR is reviewed by the maintainers of meroku and approved or comments posted.
After the PR is merged, the app is available instantly to all the dapp store implementations.
To facilitate the process of creating PR and to reduce errors, we have created a Github App and exposed functionalities in API and SDK. These API allow you to make specific request and then create a PR.
Using the Meroku Github App to automate App Management
Check if the user has “Meroku Github App” installed. This can be done by Check Permissions in the SDK. If the user has not installed the app, then get the app url and redirect for install.
Adding
You may need to upload the following
Image Screenshots of the app
Installable file (APK supported now, others coming soon)
In order to upload files, use the upload app Files endpoint. The response will give you base URLs of these files. These URLs can be used in the fields for Add app endpoint.
API Reference
SDK Reference
Updating
Updating follows the same set of params as adding.
API Reference
SDK Reference
Deleting
API
SDK
User Reviews & Ratings
This step will change as we progress towards decentralization. To know more, visit progressive decentralization.
Your app store implementation must provide a way for users to review and rate the app. The following APIs will provide the necessary functionalities.
API
Rate a dapp - https://docs.meroku.store/#/paths/dapp-rate/post
Get rating by a user for a dapp - https://docs.meroku.store/#/paths/dapp-rate/get
SDK
Rate a dapp - AnalyticsApi | @merokudao/storekit-sdk
Get rating by a user for a dapp. - AnalyticsApi | @merokudao/storekit-sdk
Featured Sections
The process to add/update featured section is similar to add/update app. And will change in future.
You will need to have featured sections in your app store. This can be implemented by these two calls. One to add/update a featured section and another to get the featured sections.
API
Get Featured Sections - https://docs.meroku.store/#/operations/getFeaturedDApps
Add Featured Section - https://docs.meroku.store/#/operations/putFeaturedSection
Delete Featured Section - https://docs.meroku.store/#/operations/deleteFeaturedSection
Toggle apps in a featured section - https://docs.meroku.store/#/operations/putFeaturedDApps
SDK
Get Featured Sections - FeaturedSectionApi | @merokudao/storekit-sdk
Add Featured Section - FeaturedSectionApi | @merokudao/storekit-sdk
Delete Featured Section - FeaturedSectionApi | @merokudao/storekit-sdk
Toggle apps in a featured section - FeaturedSectionApi | @merokudao/storekit-sdk
Let us know
If you have implemented a dapp store using dApp Store Protocol, let us know. We will love to add you to a list of app stores.